<!DOCTYPE html>

<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<script type="text/javascript" src="../../js/jquery.js"></script>
	<script type="text/javascript" src="city-picker.data.js"></script>
	<script type="text/javascript" src="city-picker.js"></script>
	<link rel="stylesheet" href="css/city-picker.css" />

	<body>
		<div style="position: relative;">
			<!-- container -->
			<input readonly id="area" type="text" data-toggle="city-picker" placeholder="请选择省/市/区" size="80">
			<input type="button" id="reset" value="重置" />
			<input type="button" id="destroy" value="销毁" />
			<input type="button" id="setValue" value="赋值" />
		</div>
		<script>
			$('#reset').click(function(){
				$("#area").citypicker("reset")
			})
			$('#destroy').click(function(){
				$("#area").citypicker("destroy")
			})
			$("#setValue").click(function(){
			// 执行赋值之前，需要执行reset和destroy的操作
			$("#area").citypicker("reset");
			$("#area").citypicker("destroy");
			$('#area').citypicker({
			  province: '江苏省',
			  city: '常州市',
			  district: '溧阳市'
			});
		});
		</script>
	</body>

</html>